package cn.wangsy.zhidao.p20170407.game.jkl;

import java.awt.Graphics;

import java.awt.Image;
import java.awt.image.ImageObserver;

import javax.swing.RepaintManager;

public class Person extends BaseImage{
	private int x,y;
	private Image person;
	Person(){
		person = loadImage("");
		
	}
	Person(int x,int y){
		this.x = x;
		this.y = y;
		person = loadImage("../images/person.png");
	}
	public void draw(Graphics g,ImageObserver io){
		g.drawImage(person, x, y,32,32, io);
		
	}
	public void move(int a){
		if(a == 1){
			this.x--;
		}else if(a == 2){
			this.x++;
		}else if(a == 3){
			this.y--;
		}else if(a == 4){
			this.y++;
		}
	
	}

	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
}
